package com.cloudlead.plugin.dict.query;

import static com.mysema.query.types.PathMetadataFactory.*;

import com.cloudlead.plugin.dict.entity.EDict;
import com.cloudlead.plugin.dict.entity.EDictGroup;


import com.mysema.query.types.path.*;

import com.mysema.query.types.PathMetadata;
import javax.annotation.Generated;
import com.mysema.query.types.Path;

import com.mysema.query.sql.ColumnMetadata;
import java.sql.Types;

import com.mysema.query.sql.*;

import com.cloudlead.common.lang.annotation.Label;


/**
 * QDict is a Querydsl query type for EDict
 */
@Label("字典查询")
@Generated("com.cloudlead.utils.persistence.codegen.serializer.SimpleMetaDataSerializer")
public class QDict extends RelationalPathBase<EDict> {

    private static final long serialVersionUID = -1746677247;

    public static final QDict dict = new QDict("dict");

    public class PrimaryKeys {

        public final PrimaryKey<EDict> primary = createPrimaryKey(id);

    }

    public class ForeignKeys {

        public final ForeignKey<EDictGroup> dictDictGroupFk = createForeignKey(groupId, "id");

    }

    public final StringPath dictLabel = createString("dictLabel");

    public final NumberPath<Integer> dictValue = createNumber("dictValue", Integer.class);

    public final StringPath groupId = createString("groupId");

    public final StringPath id = createString("id");

    public final StringPath pid = createString("pid");

    public final PrimaryKeys pk = new PrimaryKeys();

    public final ForeignKeys fk = new ForeignKeys();

    public QDict(String variable) {
        super(EDict.class, forVariable(variable), "null", "dict");
        addMetadata();
    }

    public QDict(String variable, String schema, String table) {
        super(EDict.class, forVariable(variable), schema, table);
        addMetadata();
    }

    public QDict(Path<? extends EDict> path) {
        super(path.getType(), path.getMetadata(), "null", "dict");
        addMetadata();
    }

    public QDict(PathMetadata<?> metadata) {
        super(EDict.class, metadata, "null", "dict");
        addMetadata();
    }

    public void addMetadata() {
        addMetadata(dictLabel, ColumnMetadata.named("dict_label").withIndex(3).ofType(Types.VARCHAR).withSize(255).notNull());
        addMetadata(dictValue, ColumnMetadata.named("dict_value").withIndex(2).ofType(Types.INTEGER).withSize(10).notNull());
        addMetadata(groupId, ColumnMetadata.named("group_id").withIndex(5).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(id, ColumnMetadata.named("id").withIndex(1).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(pid, ColumnMetadata.named("pid").withIndex(4).ofType(Types.CHAR).withSize(24));
    }

}

